

export default class NewMap<K,V> extends Map<K,V>{

    getOrSet(k:K,v:V){
        if (!this.has(k)) {
             this.set(k,v);
        }
        return this.get(k);
    }

    getOrSetCall(k:K,callback:(k:K)=>V){
        if (!this.has(k)) {
             this.set(k,callback(k));
        }
        return this.get(k);
    }

}